
import com.adobe.cairngorm.control.CairngormEventDispatcher;

import net.optix.ip.events.UpdateServiceEvent;
import net.optix.ip.vo.UpdateServiceVO;
private var _bService:int;

public function set bService(value:int):void
{
	_bService	=	value;
	if(value == 0)
	{
		this.label	=	"Allow in service";	
	}
	else if(value == 1)
	{
		this.label	=	"Deny in service";
	}
}

public function get bService():int
{
	return _bService;
}

private var _role:int;
public function set role(value:int):void
{
	_role	=	value;
}
public function get role():int
{
	return _role;
}

private var _userID:int;
public function set userID(value:int):void
{
	_userID	=	value;
}
public function get userID():int
{
	return _userID;
}

public function updateService():void
{
	var vo:UpdateServiceVO	=	new UpdateServiceVO();
	vo.userID		=	_userID;
	vo.role			=	_role;
	
	var event:UpdateServiceEvent	=	new UpdateServiceEvent(vo);
	com.adobe.cairngorm.control.CairngormEventDispatcher.getInstance().dispatchEvent(event);
}